# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=isync
pkgver=1.5.0
pkgrel=0
pkgdesc="IMAP and MailDir mailbox synchronizer"
url="https://isync.sourceforge.io"
arch="all"
license="GPL-3.0-or-later"
makedepends="openssl-dev cyrus-sasl-dev zlib-dev perl-dev db-dev"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://downloads.sourceforge.net/sourceforge/isync/isync-$pkgver.tar.gz"

# secfixes:
#   1.4.4-r0:
#     - CVE-2021-3657
#     - CVE-2021-44143
#   1.4.2-r0:
#     - CVE-2021-3578
#   1.4.1-r0:
#     - CVE-2021-20247

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
af62c5d871a2b4626acb27bf474ff42474a2c90618b1348a4f6b454b46fff5f0603fbbd48672ac16883bf27f9a35b535644f6b43503451b4790ba3fcef16f207  isync-1.5.0.tar.gz
"
